﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue queue = new Queue();
            queue.Enqueue("xiaohui");
            queue.Enqueue("xiaogao");
            queue.Enqueue("xiaohiu");
            Console.WriteLine("开始售票");
            while (queue.Count!=0)
            {
                Console.WriteLine(queue.Dequeue() + "已经售票");
            }
            Queue queue1 = new Queue();
            queue1.Enqueue("xiaaoao");
            queue1.Enqueue("ashdkjhn");
            queue1.Enqueue("xahska");
            object[] ojb = queue1.ToArray();
            foreach (var ieme in ojb)
            {
                Console.WriteLine(ieme);
            }
            Queue queue2 = new Queue();
            queue2.Enqueue(123);
            queue2.Enqueue("abc");
            queue2.Enqueue("zxc");
            IEnumerator enumerator = queue2.GetEnumerator();
            while (enumerator.MoveNext())
            {
                Console.WriteLine(enumerator.Current);
            }


        }
        }
}
